using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VOL.Entity.DomainModels;

namespace VOL.demo.IServices
{
    /// <summary>
    /// 入库单多表联查服务接口
    /// </summary>
    public interface IRukuService
    {
        /// <summary>
        /// 根据ID获取入库单详情（主表+明细）
        /// </summary>
        /// <param name="id">入库单ID</param>
        /// <returns>入库单详情</returns>
        Task<RukuDetailDto> GetRukuDetailByIdAsync(long id);

        /// <summary>
        /// 分页查询入库单列表（主表+明细统计）
        /// </summary>
        /// <param name="query">查询参数</param>
        /// <returns>分页结果</returns>
        Task<(List<RukuDetailDto> Data, int TotalCount)> GetRukuPagedListAsync(RukuQueryDto query);

        /// <summary>
        /// 根据入库单号获取详情
        /// </summary>
        /// <param name="stockInCode">入库单号</param>
        /// <returns>入库单详情</returns>
        Task<RukuDetailDto> GetRukuDetailByCodeAsync(string stockInCode);

        /// <summary>
        /// 获取入库单统计信息
        /// </summary>
        /// <param name="startDate">开始日期</param>
        /// <param name="endDate">结束日期</param>
        /// <returns>统计信息</returns>
        Task<Dictionary<string, object>> GetRukuStatisticsAsync(DateTime? startDate, DateTime? endDate);

        /// <summary>
        /// 分页查询入库明细列表
        /// </summary>
        /// <param name="query">查询参数</param>
        /// <returns>分页结果</returns>
        Task<(List<RukuItemDto> Data, int TotalCount)> GetRukuItemPagedListAsync(RukuItemQueryDto query);

        /// <summary>
        /// 根据入库单ID获取所有明细
        /// </summary>
        /// <param name="stockInOrderId">入库单ID</param>
        /// <returns>明细列表</returns>
        Task<List<RukuItemDto>> GetRukuItemsByOrderIdAsync(long stockInOrderId);
    }
}

